package com.tbit.uqbike.constant;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 微信常量
 *
 * @author Leon
 * 2017年5月23日 下午7:57:29
 */
@Configuration
public class WeixinConstant {

    /**
     * 支付类型0:押金;1:充值;2:免押会员;3:骑行会员;4折扣会员卡
     */
    public static final Integer RECHARGE_DEPOSIT = 0;
    /**
     * 1:充值
     */
    public static final Integer RECHARGE_PAY = 1;
    /**
     * 免押会员
     */
    public static final Integer RECHARGE_MENBER = 2;
    /**
     * 骑行会员
     */
    public static final Integer RECHARGE_RIDECARD = 3;
    /**
     * 折扣会员卡
     */
    public static final Integer RECHARGE_VIPCARD = 4;
    /**
     * App
     */
    public static final Integer RECHARGE_APP = 1;
    /**
     * 小程序
     */
    public static final Integer RECHARGE_APPLETS = 2;
    /**
     * 支付宝
     */
    public static final Integer RECHARGE_AFB = 3;
    /**
     * 微信支付分
     */
    public static final Integer RECHARGE_WXZFF = 4;

    /************************************平台类型************************************************/
    /**
     * 实际金额
     */
    public static final Integer PRACTICAL_MONEY = 0;
    /**
     * 虚拟金额
     */
    public static final Integer VIRTUAL_MONEY = 1;
    /**
     * 扣费
     */
    public static final Integer FEE_DEDUCTION = 0;
    /**
     * 充值
     */
    public static final Integer FEE_RECHARGE = 1;
    /**
     * 微信退款证书路径
     */
    public static String deposit_return_app_path = "D:\\cert\\apiclient_cert_app_%s.p12";
    public static String deposit_return_weixin_path = "D:\\cert\\apiclient_cert_weixin_%s.p12";
    /**
     * 创建支付分订单接口路径
     */
    public static String establishOrderUrl = "https://api.mch.weixin.qq.com/v3/payscore/serviceorder";
    /**
     * apiV3证书地址
     */
    public static String filenameUrl = "D:\\cert\\ipv\\apiclient_key_%s.pem";

    @Value("${deposit_return_app_path}")
    public void setReturnAppPath(String returnAppPath) {
        deposit_return_app_path = returnAppPath;
    }

    @Value("${deposit_return_weixin_path}")
    public void setReturnWeiXinPath(String returnWeiXinPath) {
        deposit_return_weixin_path = returnWeiXinPath;
    }

    @Value("${filenameUrl}")
    public void setFilenameUrl(String filenameUrlInProperties) {
        filenameUrl = filenameUrlInProperties;
    }

}
